package com.roncoo.eshop.inventory.dao.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.roncoo.eshop.inventory.dao.RedisDAO;

import redis.clients.jedis.JedisCluster;

/**
 * Copyright: Copyright (c) 2019 Hu-Cheng
 * 
 * @ClassName: RedisDAOImpl.java
 * @Description: Redis实现类
 *
 * @version: v1.0.0
 * @author: hucheng
 * @date: 2019年9月18日 下午5:13:18
 *
 */
@Repository("redisDAO")
public class RedisDAOImpl implements RedisDAO {

	@Autowired
	private JedisCluster jedisCluster;

	@Override
	public void set(String key, String value) {
		jedisCluster.set(key, value);
	}

	@Override
	public String get(String key) {
		return jedisCluster.get(key);
	}

	@Override
	public void del(String key) {
		jedisCluster.del(key);
	}

}
